/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.tenant.mp.TenantEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 配件信息表实体类
 *
 * @author ysq
 * @since 2023-08-09
 */
@Data
@TableName("blade_parts_info")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PartsInfo对象", description = "配件信息表")
public class PartsInfo extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 配件编号
	*/
	@ApiModelProperty(value = "配件编号")
	private Integer code;
	/**
	* 编码前缀
	*/
	@ApiModelProperty(value = "编码前缀")
	private String prefixCode;
	/**
	* 配件名称
	*/
	@NotBlank(message = "配件名称不能为空")
	@ApiModelProperty(value = "配件名称")
	private String partsName;
	/**
	* 成本单价
	*/
	@ApiModelProperty(value = "成本单价")
	private BigDecimal costPrice;
	/**
	* 配件类别id
	*/
	@NotNull(message = "配件类别id不能为空")
	@ApiModelProperty(value = "配件类别id")
	private Long maintainPartsId;
	/**
	* 配件类别名称
	*/
	@NotBlank(message = "配件类别名称不能为空")
	@ApiModelProperty(value = "配件类别名称")
	private String maintainPartsName;
	/**
	*  品牌名称
	*/
	@NotBlank(message = "品牌名称不能为空")
	@ApiModelProperty(value = " 品牌名称")
	private String brand;
	/**
	* 规格型号
	*/
	@NotBlank(message = "规格型号不能为空")
	@ApiModelProperty(value = "规格型号")
	private String model;
	/**
	* 单位
	*/
	@NotBlank(message = "单位不能为空")
	@ApiModelProperty(value = "单位")
	private String unit;
	/**
	* 图片url
	*/
	@ApiModelProperty(value = "图片url")
	private String imgUrl;

	@ApiModelProperty(value = "编码关键字搜索")
	@TableField(exist = false)
	private String searchCode;

	@ApiModelProperty(value = "提交人")
	@TableField(exist = false)
	private String realName;
}
